import request from "@/utils/request";

export const newsInsertService=(newsInfo)=>{
    // const brand = new URLSearchParams();
    // for (let key in brandInfo) {
    //     brand.append(key, brandInfo[key]);
    // }

    return request.post('/backend/news',newsInfo);
}

export const newsInfoService=(params)=>{
    return request.get('/backend/news',{params:params});
}

export const upNewsInfoService=(newsInfo)=>{
    const brand = new URLSearchParams();
    for (let key in newsInfo) {
        brand.append(key, newsInfo[key]);
    }
    return request.post('/backend/news/update',brand);
}


export const deleteNewsService=(id)=>{

    return request.delete('/backend/news?id='+id);
}